import axios from 'axios'

interface IsDomain{
  name: string,
  remark: string
}
//获取列表
export const  getDomainList=(params:any):any=>{
  return axios.get('/webapi/api/app/sort-line-hosts',{params})
}

//获取单个
export const getDomainId = (id:string): any => {
  return axios.get(`/webapi/api/app/sort-line-hosts/${id}`)
}

//新增
export const addDomain=(params:IsDomain):any=>{
     return axios.post('/webapi/api/app/sort-line-hosts',params)
}
//删除
export const deleteDomain=(id:string):any=>{
  return axios.delete('/webapi/api/app/sort-line-hosts/'+id)
}
//修改
export const editDomain=(id:string,params:IsDomain):any=>{
  return axios.put('/webapi/api/app/sort-line-hosts/'+id,params)
}
